package com.atguigu.spzx.manager.service.impl;

import com.atguigu.spzx.manager.mapper.ShoppingCartMapper;
import com.atguigu.spzx.manager.service.ShoppingCartService;
import com.atguigu.spzx.model.dto.sell.sellDto;
import com.atguigu.spzx.model.entity.system.SysUser;
import com.atguigu.spzx.model.vo.sell.SellVo;
import com.atguigu.spzx.utils.AuthContextUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShoppingCartServiceImpl implements ShoppingCartService {

    @Autowired
    private ShoppingCartMapper shoppingCartMapper;
    @Override
    public void InCart(sellDto selldto) {
        SysUser sysUser = AuthContextUtil.get();
        String userName = sysUser.getUserName();
        selldto.setBussnessName(userName);
        shoppingCartMapper.InCart(selldto);
    }

}
